Raised This Month: $51 Target: $400
 12% 

[CS 1.6] Health Plugin ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MrNothing
New Member
Join Date: Oct 2010
Old 10-09-2010 , 04:12   [CS 1.6] Health Plugin ?
Reply With Quote #1

Hi ppl
i need help , i need HP Bonus Pugin :

when i kill somebody get 5 HP
when i kill Somebody " head Shot " get 15 HP
when i kill Somebody " Knife " Get 10 HP

####################
Can Somebody Make it Plz ?
this is picture from Server
i killed somebody and get 5 Hp [ + Blue Glow Screen ]



[IMG]http://img176.**************/img176/1075/52566850.jpg[/IMG]

i realy need this plugin

Thx .

Last edited by MrNothing; 10-09-2010 at 10:42.
MrNothing is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 10-09-2010 , 04:17   Re: [CS 1.6] Health Plugin ?
Reply With Quote #2

Already exists. Search the forum (not just Approved section).
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
MrNothing
New Member
Join Date: Oct 2010
Old 10-09-2010 , 04:27   Re: [CS 1.6] Health Plugin ?
Reply With Quote #3

What is the name of this plugin ?
MrNothing is offline
Xalus
Veteran Member
Join Date: Dec 2009
Location: Belgium
Old 10-09-2010 , 09:02   Re: [CS 1.6] Health Plugin ?
Reply With Quote #4

[v1.2]

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>

#define PLUGIN "Bonus"
#define VERSION "1.2"
#define AUTHOR "Xalus"

#define Tag "[Bonus]"

new cStatuscMaxHealth;
new 
cKillcKnifecHeadshotcKnifeHeadshot;

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
/* Cvar */
    
cStatus        register_cvar("bonus_status""1");
    
cMaxHealth    register_cvar("bonus_maxhealth""100");
    
/* Bonus */
    
cKill        register_cvar("bonus_kill""5");
    
cKnife        register_cvar("bonus_knife""10");
    
cHeadshot    register_cvar("bonus_headshot""15");
    
cKnifeHeadshot    register_cvar("bonus_knifeheadshot""25");
    
    
/* Player Killed */
    
register_event"DeathMsg""EventDeathMsg""a""1>0" );
}
/*
Bonus:
- Player Killed
*/
public EventDeathMsg() {
    new 
killer read_data(1);
    new 
victim read_data(2);
    new 
headshot read_data(3);
    new 
weapon get_user_weapon(killer);
    new 
num;
    
    if(
killer == victim || !get_pcvar_num(cStatus) || !is_user_connected(victim) || !is_user_alive(killer))
        return 
PLUGIN_HANDLED;
    
    if(
headshot && weapon == CSW_KNIFE) {
        
num get_pcvar_num(cKnifeHeadshot)
        
GiveHealth(killernum)
        
HudMessage(killer"Healed +%ihp"num)
    } else if(
headshot) {
        
num get_pcvar_num(cHeadshot)
        
GiveHealth(killernum)
        
HudMessage(killer"Healed +%ihp"num)
    } else if(
weapon == CSW_KNIFE) {
        
num get_pcvar_num(cKnife)
        
GiveHealth(killernum)
        
HudMessage(killer"Healed +%ihp"num)
    } else {
        
num get_pcvar_num(cKill)
        
GiveHealth(killernum)
        
HudMessage(killer"Healed +%ihp"num)
    }
    return 
PLUGIN_CONTINUE;
}
/*
Bonus:
    - Give Health
    - Hud Message
*/
GiveHealth(idcount)
    
set_user_health(idmin( (get_user_health(id) + count), get_pcvar_num(cMaxHealth) ))

stock HudMessage(const id, const input[], any:...) {
    static 
msg[191];
    
vformat(msg190input3);
    
    
set_hudmessage(1271702550.270.1405.05.00.00.0, -1);
    
show_hudmessage(id"%s^n%s"Tagmsg)

__________________
Retired.

Last edited by Xalus; 10-10-2010 at 12:04.
Xalus is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 10-09-2010 , 09:57   Re: [CS 1.6] Health Plugin ?
Reply With Quote #5

Why do you use register_message ?
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Xalus
Veteran Member
Join Date: Dec 2009
Location: Belgium
Old 10-09-2010 , 09:59   Re: [CS 1.6] Health Plugin ?
Reply With Quote #6

Quote:
Originally Posted by ConnorMcLeod View Post
Why do you use register_message ?
  • It works? :p
  • -> I think Emp' did that once, for my 'Knife-Runner' plugin. (I think its more for block deathmsg, but this way works :p
__________________
Retired.
Xalus is offline
MrNothing
New Member
Join Date: Oct 2010
Old 10-09-2010 , 10:41   Re: [CS 1.6] Health Plugin ?
Reply With Quote #7

thx dude
Its Work But The Message Disappear Very fast

Can you Make Message show for more second


i almost saw it


[IMG]http://img233.**************/img233/7278/88134117.jpg[/IMG]

Last edited by MrNothing; 10-09-2010 at 11:08.
MrNothing is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 10-09-2010 , 10:44   Re: [CS 1.6] Health Plugin ?
Reply With Quote #8

Don't use register_message unless you need to change params or block message.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Xalus
Veteran Member
Join Date: Dec 2009
Location: Belgium
Old 10-09-2010 , 11:34   Re: [CS 1.6] Health Plugin ?
Reply With Quote #9

[v1.1]
- Longer Hudmsg (Normaly)
- Hud msg in the middle
- Removed Register_message
Link - v1.1

Quote:
Originally Posted by ConnorMcLeod View Post
Don't use register_message unless you need to change params or block message.
So good or?
__________________
Retired.
Xalus is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 10-09-2010 , 12:56   Re: [CS 1.6] Health Plugin ?
Reply With Quote #10

hud channel -2 ?
What is this number standing for ?

get_user_weapon can't work in few situations (nades, awp fast switch, ...)
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:19.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode